<template>
  <div id="app">
    <router-view class="main"></router-view>

    <van-tabbar active-color="#4fc08d" route :fixed="false" v-show="isShow">
      <!-- 加上route属性，就可以让每个子节点当作路由组件使用 -->
      <van-tabbar-item icon="wap-home-o" :to="{ name: 'home' }"
        >首页</van-tabbar-item
      >
      <van-tabbar-item icon="orders-o" :to="{ name: 'VueYimutianList' }"
        >列表</van-tabbar-item
      >
      <van-tabbar-item
        icon="shopping-cart-o"
        :to="{ name: 'VueYimutianShopCar' }"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item icon="manager-o" :to="{ name: 'VueYimutianUser' }"
        >我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>
<script>
export default {
  data() {
    return {
      isShow: true,
    };
  },
  watch: {
    $route(v) {
      if (v.meta.TarisShowed) {
        this.isShow = false;
      } else {
        this.isShow = true;
      }
    },
  },
};
</script>
<style>
html,
body,
#app {
  width: 100%;
  height: 100%;
}
#app {
  display: flex;
  flex-direction: column;
}
.main {
  flex: 1;
  overflow: auto;
}
</style>
